
import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.StdIn;
import edu.princeton.cs.algs4.StdOut;

class print {
    public static void main(String[] args) {
        Student[] students = new Student[5];
        int[] data = In.readInts(args[0]); 
        for (int i = 0; i < students.length; i++) {
            students[i] =new Student();
            System.out.print("请输入学生" + (i + 1) + "的姓名：");
            students[i].name = data[i*4];
            System.out.print("请输入学生" + (i + 1) + "的性别：");
            students[i].gender = data[i*4+1];
            System.out.print("请输入学生" + (i + 1) + "的年龄：");
            students[i].age = data[i*4+2];
            System.out.print("请输入学生" + (i + 1) + "的java成绩：");
            students[i].java = data[i*4+3];
            students[i].print();
        }
        // int sum = 0;
        // for (int i = 0; i < students.length; i++) {
        //     students[i].print();
        //     sum += (double)students[i].java;
        // }
        // System.out.println("成绩的平均分是"+(sum/students.length));
    }
}

class Student {
    int name;
    int age;
    int gender;
    int id;
    int java;

    


    public void print() {
        StdOut.println("这位学生的名字是：" + this.name +
                "，年龄：" + this.age + "，性别：" + this.gender + "，成绩是：" + this.java);
    }
}
